SUBDIRS =	\
	icons	\
	panel-plugin \
	po

distclean-local:
	rm -rf *.cache *~

rpm: dist
	rpmbuild -ta $(PACKAGE)-$(VERSION).tar.gz
	@rm -f $(PACKAGE)-$(VERSION).tar.gz

install_tar: 
	rm -fr /tmp/tmp_$(USER)
	mkdir -p /tmp/tmp_$(USER)
	$(MAKE) install $(AM_MAKEFLAGS) DESTDIR="/tmp/tmp_$(USER)"
	find /tmp/tmp_$(USER)
	rm -f $(PACKAGE).tgz
	fakeroot tar cvfz $(PACKAGE).tgz -C /tmp/tmp_$(USER)/ .

deb:
	rm -fr /tmp/tmp_$(USER)
	mkdir -p /tmp/tmp_$(USER)/$(PACKAGE)-$(VERSION)/DEBIAN
	cp deb_control /tmp/tmp_$(USER)/$(PACKAGE)-$(VERSION)/DEBIAN/control
	$(MAKE) install $(AM_MAKEFLAGS) DESTDIR="/tmp/tmp_$(USER)/$(PACKAGE)-$(VERSION)/"
	rm -f $(PACKAGE)*.deb
	fakeroot dpkg-deb -b /tmp/tmp_$(USER)/$(PACKAGE)-$(VERSION) .
	
.PHONY: ChangeLog

ChangeLog: Makefile
	(GIT_DIR=$(top_srcdir)/.git git log > .changelog.tmp \
	&& mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) \
	|| (touch ChangeLog; echo 'Git directory not found: installing possibly empty changelog.' >&2)

dist-hook: ChangeLog

EXTRA_DIST = \
	intltool-extract.in \
	intltool-merge.in \
	intltool-update.in

DISTCLEANFILES = \
	intltool-extract \
	intltool-merge \
	intltool-update

# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
